/**
 * 
 */
package json.item;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import net.sf.ezmorph.Morpher;
import net.sf.ezmorph.MorpherRegistry;
import net.sf.ezmorph.bean.BeanMorpher;
import net.sf.json.JSONObject;
import net.sf.json.util.JSONUtils;

/**
 * @author Administrator 属性值
 */
/*
 * 名称 类型 是否隐私 示例值 描述 cid Number 否 50010538 类目ID pid Number 否 1627207 属性 ID
 * prop_name String 否 颜色 属性名 vid Number 否 3232483 属性值ID name String 否 军绿色 属性值
 * name_alias String 否 军绿色 属性值别名 is_parent Boolean 否 true 是否为父类目属性 status String
 * 否 normal 状态。可选值:normal(正常),deleted(删除) sort_order Number 否 0 排列序号。取值范围:大于零的整数
 */
public class PropValue {

	String cid, pid, prop_name, vid, name, name_alias, status, sort_order;
	boolean is_parent;
/*不要觉得奇怪，为了兼容淘宝json格式，所以就这么定义了
	{\"multi\":false,\"must\":true,\"name\":\" 型号\",\"pid\":5701487,\"prop_values\":{\"prop_value\":[{\"name\":\"H202\",\"vid\":3903000},{\"name\":\"RH201\",\"vid\":7075850},{\"name\":\"H205G\",\"vid\":6737334}]}}
	*/
	PropValue prop_value[] ;
	
	
//	public PropValue()
//	{
//		prop_value = this;
//	}
//	public void init()
//	{
//		
//	}
	

	public String getCid() {
		return cid;
	}

	public PropValue[] getProp_value() {
		return prop_value;
	}

	public void setProp_value(PropValue[] prop_value) {
		this.prop_value = prop_value;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getProp_name() {
		return prop_name;
	}

	public void setProp_name(String prop_name) {
		this.prop_name = prop_name;
	}

	public String getVid() {
		return vid;
	}

	public void setVid(String vid) {
		this.vid = vid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName_alias() {
		return name_alias;
	}

	public void setName_alias(String name_alias) {
		this.name_alias = name_alias;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSort_order() {
		return sort_order;
	}

	public void setSort_order(String sort_order) {
		this.sort_order = sort_order;
	}

	public boolean isIs_parent() {
		return is_parent;
	}

	public void setIs_parent(boolean is_parent) {
		this.is_parent = is_parent;
	}

	public static void main(String[] argv) {
		String json = "{\"name\":\"H201\",\"vid\":3903000},{\"name\":\"H203\",\"vid\":3903000}";
		JSONObject jsonObject = JSONObject.fromObject(json);
		PropValue bean = (PropValue) JSONObject.toBean(jsonObject,
				PropValue.class);
		System.out.println(bean);
		System.out.println(bean.getName());

	
	}
}
